//
//  LCSettingViewController.m
//  lechuang
//
//  Created by Mr_hi on 2023/4/3.
//  Copyright © 2023 Mooyi. All rights reserved.
//

#import "LCSettingViewController.h"
#import "LCUserModel.h"
#import "LCMineInfoViewController.h"
#import "LCEditPswdViewController.h"

#import "LCNavigationViewController.h"
#import "LCLoginViewController.h"

@interface LCSettingViewController ()

@end

@implementation LCSettingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (IBAction)backAction:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}

- (IBAction)mineInfoBtnAction:(UIButton *)sender {
    LCMineInfoViewController * pushVC = [LCMineInfoViewController xx_instantiateFromStoryboardNamed:@"Mine"];
    pushVC.dataMode = self.dataMode;
    [self.navigationController pushViewController:pushVC animated:YES];
}

- (IBAction)editPswdBtnAction:(UIButton *)sender {
    LCEditPswdViewController * pushVC = [LCEditPswdViewController xx_instantiateFromStoryboardNamed:@"Mine"];
    [self.navigationController pushViewController:pushVC animated:YES];
}

- (IBAction)loginOutBtnAction:(UIButton *)sender {
    [LCUserCenter removeObjectForKey:UserInfo];
    [LCUserCenter removeObjectForKey:klogin_cre];
    [LCUserCenter removeObjectForKey:Userid];
    [LCUserCenter removeObjectForKey:UserName];
    [LCUserCenter removeObjectForKey:UserImg];
    
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    LCLoginViewController * loginVC = [LCLoginViewController xx_instantiateFromStoryboardNamed:@"Login"];
    loginVC.window = window;
    LCNavigationViewController * navtion = [[LCNavigationViewController alloc] initWithRootViewController:loginVC];
    window.rootViewController = navtion;
}

@end
